<%@ Control Language="C#" %>
<%@ Register Assembly="Swaf.Gui.AspNet2" Namespace="Swaf.Gui.AspNet2" TagPrefix="swf" %>
<%@ Register Assembly="Syrinx.Gui.AspNet.NitobiCtls" Namespace="Syrinx.Gui.AspNet.NitobiCtls" TagPrefix="nit" %>
<%HtmlBlock method="processList"; %>
<%Conditional on = "CurrentBizObj.product.metaType==-Department"; %>
<div class="departmentlistbox">
	<div class="title"><asp:HyperLink ID="product_title" runat="server" NavigateUrl="$navLink$" /></div>
	<div class="mainMediaArea"><asp:HyperLink ID="product_primaryPicture_name" runat="server" ImageUrl="~/$product.mediaCacheName$/$imageRes$/$product.primaryPicture.name$" 
			EnableViewState="false"  NavigateUrl="$navLink$"/>
	</div>
	<div class="summary"><swf:ReadOnlyText ID="product_summary" runat="server" /></div>
</div>
<%EndConditional; %>

<%Conditional on = "CurrentBizObj.product.metaType!=-Department"; %>
<div class="productlistbox">
	<table><tr><td valign="top">
		<div class="mediaArea">
			<asp:HiddenField ID="id" runat="server" />
			<asp:HyperLink ID="product_primaryPicture_name" runat="server" ImageUrl="~/$product.mediaCacheName$/$imageRes$/$product.primaryPicture.name$" 
				EnableViewState="false"  NavigateUrl="$navLink$"/>
		</div>
	</td><td valign="top">
		<div class="title"><asp:HyperLink ID="product_title" runat="server" NavigateUrl="$navLink$" /></div>
		<div class="summary"><swf:ReadOnlyText ID="product_summary" runat="server" /></div>
		<div class="priceArea"><asp:Label id="_priceLbl" runat="server">Price:</asp:Label> <div class="sellPrice"><swf:ReadOnlyText id="product_sellPrice__priceFormat__" runat="server" /></div><swf:ReadOnlyText id="product_sellPriceDescription" runat="server" /></div>
		<%Conditional on = "CurrentBizObj.product.quantityAvailable!=0"; %>
			<%Conditional on = "CurrentBizObj.product.quantityAvailable!=-2"; %>
				<%Conditional on = "CurrentBizObj.quantity!=0"; %>
				<div class="quantityArea"><asp:Label ID="_quantityLbl" runat="server">Quantity:</asp:Label><asp:TextBox runat="server" ID="quantity" Width="2em" /></div>
				<div class="cart"><nit:ActionButton runat="server" ID="_add2CartBtn" Actions="$Parent$.UpdateBizObj" Text="$updateQtyBtnText$"/></div>
				<div class="orderItemInfo">
					<asp:Label ID="description" runat="server" />&nbsp;&nbsp;
					<asp:Label ID="_subTltLbl" runat="server">sub-total:</asp:Label>
					<asp:Label ID="totalFormated" runat="server" /><asp:Label ID="_ppLbl" runat="server">++</asp:Label>
				</div>
				<%EndConditional; %>
				<%Conditional on = "CurrentBizObj.quantity==0"; %>
				<div class="cart"><nit:ActionButton runat="server" ID="_addOneToCartBtn" Actions="$Parent$.AddOne" Text="$addFirstBtnText$" TriggerParam="$id$" /></div>
				<%EndConditional; %>
			<%EndConditional; %>
			<%Conditional on = "CurrentBizObj.product.quantityAvailable==-2"; %>
				<div class="quantityArea" style="font-size:smaller">
				<asp:Label runat="server" ID="_needStart" Text="Make reservation to see availability." /></div>			
			<%EndConditional; %>
		<%EndConditional; %>
		<%Conditional on = "CurrentBizObj.product.quantityAvailable==0"; %>
			<div class="quantityArea"><asp:Label runat="server" ID="_unavail" Text="Unavailable" /></div>
		<%EndConditional; %>
	</td></tr></table>
</div>
<%EndConditional; %>
<%EndHtmlBlock; %>
